package com.devin.repository;

import com.devin.model.entity.Movie;
import com.devin.repository.base.BaseRepository;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: simpl
 * @date: 2020/3/27
 * @time: 13:25
 * @description: 
 */
@Repository
public interface MovieRepository extends BaseRepository<Movie,Long> {


    @Query(value = "SELECT * from movie where title like %?1%",nativeQuery = true)
    public Page<Movie> search(String key, Pageable pageable);

}
